
project(korners)

find_package(KDE4 REQUIRED)

include(KDE4Defaults)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})

include_directories( ${KDE4_INCLUDES})
include_directories( ${CMAKE_BINARY_DIR} )

add_subdirectory( themes )
add_subdirectory( translations )


set(korners_SRCS 
    main.cpp
    korners_window.cpp
    korners_widget.cpp
    korners_game_engine.cpp
    korners_game_engine_ai.cpp
    korners_scene.cpp
    korners_render.cpp
    korners_time_line.cpp
    korners_socket.cpp
    korners_protocol.cpp
    korners_server.cpp
    korners_game_engine_network.cpp
    korners_engine_thread.cpp
    korners_netgame_dialog.cpp
    korners_netgame_dialog_ip.cpp
    korners_netgame_settings.cpp
    korners_game_engine_dual.cpp
    korners_game_engine_timer.cpp
    )

kde4_add_ui_files( korners_SRCS korners_netgame_dialog.ui
                                korners_netgame_dialog_ip.ui
                                korners_network_settings.ui )
kde4_add_kcfg_files( korners_SRCS ./korners.kcfgc )

kde4_add_app_icon(klines_SRCS "hi*-app-korners.png")

kde4_add_executable(korners ${korners_SRCS})

target_link_libraries(korners ${KDE4_KDEUI_LIBS} kdegames )

######### install ####################################################

install( TARGETS korners  ${INSTALL_TARGETS_DEFAULT_ARGS} )
install( FILES korners.kcfg  DESTINATION  ${KCFG_INSTALL_DIR} )
install( FILES kornersui.rc  DESTINATION  ${DATA_INSTALL_DIR}/korners )

kde4_install_icons( ${ICON_INSTALL_DIR}   )

